extends Area2D

var derection = Vector2(0,-1)


# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):
	position += derection * GlobalConstant.BULLET_SPEED * delta


func _on_body_entered(body):
	if body is Enemy:
		(body as Enemy).byAttacked()
	pass # Replace with function body.


func _on_visible_on_screen_notifier_2d_screen_exited():
	queue_free()
	pass # Replace with function body.
